$(".docenter").submit(function () {
    var formData = $(".docenter").serialize();
    $.ajax({
        url:'../paddpass',
        data:formData,
        type:'post',
        dataType:'json',
        success:function (data) {
            if (data['status'] == 1){
                layer.msg("原密码输入错误！",{offset:'50%',icon:6,time:1000},function () {
                    location.reload();
                });
            } else if (data['status'] == 2) {
                layer.msg("新密码两次密码输入不一致！",{offset:"50%",icon:6,time:1000},function () {
                    location.reload();
                });
            } else if (data['status'] == 3){
                layer.msg("新密码与原密码一致！",{offset:"50%",icon:6,time:1000},function () {
                    location.reload();
                });
            } else {
                layer.msg("修改成功！",{offset:"50%",icon:6,time:1000},function () {
                    location.href = '../plogin';
                });
            }
        }
    })
    return false;
});